package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.common.constant.ServiceOfferConsts;
import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteProdInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;

/**
* @Description: 型号属性处理类
*
* @author lyx
* @date 2021年3月15日
* @version V1.0
* @Package com.iwhalecloud.bss.kite.cucc.service.attr.handler
*/
public class ModelAttrHandler extends AbstractAttrHandler<KiteProdInst, AttrData> {

    @Override
    public void after(KiteAttr attr, KiteProdInst inst, AttrData data) {
        // 暂时这样改吧，serviceControlScope配置表加了配置也不生效
        if (KiteStringUtils.equals(inst.getSpecId(), "30004000") && KiteStringUtils.equals(attr.getFieldName(), "200002772")
            && ServiceOfferConsts.SERVICE_OFFER_MODIFY.equals(data.getServiceOfferId())) {
            attr.setIsEdit(KeyConsts.IFTRUE_F);
            attr.setIsEditImg(KeyConsts.IFTRUE_F);
        }
        super.after(attr, inst, data);
    }
}
